From 0d43d11387a938791b9a279eafdf083cfed4cfdd Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 27 Mar 2019 17:15:26 -0400 Subject: [PATCH] gdk: Drop gdk_surface_set_role This is a very old X session management thing, and you will be hard-pressed to find a session manager that can make use of it, and even harder-pressed to find apps using it to their advantage. --- docs/reference/gdk/gdk4-sections.txt | 1 - gdk/gdksurface.c | 26 -------------------------- gdk/gdksurface.h | 3 --- gdk/gdksurfaceimpl.h | 2 -- 4 files changed, 32 deletions(-) diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 281e86f33d..f001a252f8 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -279,7 +279,6 @@ gdk_surface_get_children gdk_surface_peek_children gdk_surface_set_icon_name gdk_surface_set_transient_for -gdk_surface_set_role gdk_surface_set_startup_id gdk_surface_set_group gdk_surface_get_group diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 689999ba75..49291340da 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -4230,32 +4230,6 @@ gdk_surface_set_title (GdkSurface *surface, GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_title (surface, title); } -/** - * gdk_surface_set_role: - * @surface: a toplevel #GdkSurface - * @role: a string indicating its role - * - * When using GTK, typically you should use gtk_window_set_role() instead - * of this low-level function. - * - * The window manager and session manager use a surface’s role to - * distinguish it from other kinds of surface in the same application. - * When an application is restarted after being saved in a previous - * session, all surfaces with the same title and role are treated as - * interchangeable. So if you have two surfaces with the same title - * that should be distinguished for session management purposes, you - * should set the role on those surfaces. It doesn’t matter what string - * you use for the role, as long as you have a different role for each - * non-interchangeable kind of surface. - * - **/ -void -gdk_surface_set_role (GdkSurface *surface, - const gchar *role) -{ - GDK_SURFACE_IMPL_GET_CLASS (surface->impl)->set_role (surface, role); -} - /** * gdk_surface_set_startup_id: * @surface: a toplevel #GdkSurface diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h index 122ca51ddd..1ec9ec3318 100644 --- a/gdk/gdksurface.h +++ b/gdk/gdksurface.h @@ -570,9 +570,6 @@ GDK_AVAILABLE_IN_ALL void gdk_surface_set_title (GdkSurface *surface, const gchar *title); GDK_AVAILABLE_IN_ALL -void gdk_surface_set_role (GdkSurface *surface, - const gchar *role); -GDK_AVAILABLE_IN_ALL void gdk_surface_set_startup_id (GdkSurface *surface, const gchar *startup_id); GDK_AVAILABLE_IN_ALL diff --git a/gdk/gdksurfaceimpl.h b/gdk/gdksurfaceimpl.h index 03342e477f..4dfc42e081 100644 --- a/gdk/gdksurfaceimpl.h +++ b/gdk/gdksurfaceimpl.h @@ -136,8 +136,6 @@ struct _GdkSurfaceImplClass GdkSurfaceHints geom_mask); void (* set_title) (GdkSurface *surface, const gchar *title); - void (* set_role) (GdkSurface *surface, - const gchar *role); void (* set_startup_id) (GdkSurface *surface, const gchar *startup_id); void (* set_transient_for) (GdkSurface *surface, -- 2.30.2